package com.mrxu.monitor.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Data
@Component
@ConfigurationProperties(MonitorProperties.MONITORPREFIX)
public class MonitorProperties {


    /**
     * 前缀
     */
    public static final String MONITORPREFIX = "monitor";

    private boolean enable = false;

    /**
     * 监控项目的编码
     */
    private String projectCode;

    /**
     * 访问密码
     */
    private String viewPassword;

    /**
     * 拦截器忽略的信息配置
     */
    private InterceptorConfig interceptor = InterceptorConfig.getDefault();

    /**
     * 通知相关配置
     */
    private NotifyConfig notify;

    /**
     * 攻击相关配置
     */
    private AttackConfig attack = new AttackConfig();

    /**
     * 业务状态码相关配置
     */
    private BusinessCodeConfig bizCode = new BusinessCodeConfig();

    /**
     * 状态码相关配置
     */
    private StatusConfig httpStatusConfig = new StatusConfig();

    /**
     * 超时相关配置
     */
    private TimeOutConfig timeOutConfig = new TimeOutConfig();

    /**
     * 业务状态码
     */
    private BusinessCodeConfig businessCode;

}
